Skip to content

First simulation

This tutorial will guide you through your first simulation using the Trano library. Trano is a Python library designed for simulating building energy systems with the Buildings and IDEAS libraries. You'll need only a configuration file and a few lines of code to get started.

This tutorial aims to demonstrate how easy it is to perform building energy simulations using Trano, while also showcasing the automatically generated results presented in a clear report.

Input configuration file

The described configuration outlines a building with the following characteristics:

  • Construction Materials: The walls are made of three layers of a dense material (density of 2000 kg/m³) with low thermal conductivity (0.035 W/m·K), indicating good insulation properties. The construction is uniform across all walls, suggesting a consistent thermal performance.

  • Glazing System: The windows feature a double-glazing system with air as the gas layer, which provides additional insulation. The specific properties of the glass suggest it has moderate emissivity, allowing some solar heat gain while also maintaining insulation.

  • Floor Area and Room Height: The building has a floor area of 100 m² and an average room height of 2.5 m, indicating a typical residential or small commercial space.

  • External Boundaries: The building has external walls primarily oriented south (180° azimuth), which could suggest that it is designed to maximize solar gain, particularly in colder climates.

Overall, this configuration represents a well-insulated, energy-efficient building, likely intended for residential use or small commercial purposes, designed with notable attention to thermal performance.

material:
  - id: MATERIAL:001
    thermal_conductivity: 0.035
    density: 2000.0
    specific_heat_capacity: 1000.0
  - id: MATERIAL:002
    thermal_conductivity: 0.035
    density: 2000.0
    specific_heat_capacity: 1000.0
  - id: MATERIAL:003
    thermal_conductivity: 0.035
    density: 2000.0
    specific_heat_capacity: 1000.0

constructions:
  - id: CONSTRUCTION:001
    layers:
      - material: MATERIAL:001
        thickness: 0.1
      - material: MATERIAL:002
        thickness: 0.1
      - material: MATERIAL:003
        thickness: 0.1
glass_material:
  - density: 2500.0
    id: GLASS:001
    longwave_emissivity: 0.84
    shortwave_emissivity: 0.67
    specific_heat_capacity: 840.0
    thermal_conductivity: 1.0
gas:
  - density: 1.2
    id: AIR:001
    longwave_emissivity: 0.0
    shortwave_emissivity: 0.0
    specific_heat_capacity: 1006.0
    thermal_conductivity: 0.0256
glazings:
- id: INS2AR2020:001
  layers:
  - glass: GLASS:001
    thickness: 0.006
  - gas: AIR:001
    thickness: 0.016
  - glass: GLASS:001
    thickness: 0.006
spaces:
  - parameters:
      floor_area: 100.0
      average_room_height: 2.5
    external_boundaries:
      external_walls:
        - surface: 100.0
          azimuth: 180.0
          tilt: wall
          construction: CONSTRUCTION:001
        - surface: 100.0
          azimuth: 180.0
          tilt: wall
          construction: CONSTRUCTION:001
        - surface: 200.0
          azimuth: 180.0
          tilt: wall
          construction: CONSTRUCTION:001
      floor_on_grounds:
        - surface: 1.0
          construction: CONSTRUCTION:001
      windows:
        - surface: 1.0
          azimuth: 180.0
          tilt: wall
          construction: INS2AR2020:001
          width: 1.0
          height: 1.0

Code

Test tutorials
    from trano.main import simulate_model
    from trano.simulate.simulate import SimulationLibraryOptions

    simulate_model(
        "./first_simulation.yaml",
        SimulationLibraryOptions(
            start_time=0,
            end_time=2 * 3600 * 24 * 7,
        ),
    )

General Explanation

The code snippet imports the simulate_model function and the SimulationLibraryOptions class from specific modules within the trano package, then calls the simulate_model function with a configuration file and simulation options.

Description and Parameters

  • Function: simulate_model
  • Parameters:
    • config_file: Path to the simulation configuration file (string, e.g., "./first_simulation.yaml").
    • options: Instance of SimulationLibraryOptions.
    • start_time: Start time for the simulation (integer, seconds).
    • end_time: End time for the simulation (integer, seconds). Calculated as 2 * 3600 * 24 * 7 (two weeks).

Results

Once the simulation is terminated, Trano will generate the following report. It includes a detailed description of the various parameters utilized during the simulation. In addition to the parameters specified in the YAML file, the report also details all default parameters employed throughout the simulation.

Spaces

External Boundaries Table

hRoo AFlo linearizeRadiation m_flow_nominal mSenFac T_start volume
2.5 100.0 true 0.01 1.0 294.15 250.0
gain k occupancy name
[40; 75; 40] 1/7/3 3600*{9, 17} occupancy_1

Construction

Layer Information Table

Name Azimuth Construction Name Surface Tilt
externalwall_0 180.0 construction_001 100.0 wall
externalwall_1 180.0 construction_001 100.0 wall
externalwall_2 180.0 construction_001 200.0 wall
window_0 180.0 ins2ar2020_001 1.0 wall
flooronground_0 90.0 construction_001 1.0 floor
Layers for ins2ar2020_001
Name c epsLw epsSw k rho Thickness
glass_001 840.0 0.84 0.67 1.0 2500.0 0.006
air_001 1006.0 0.0 0.0 0.0256 1.2 0.016
glass_001 840.0 0.84 0.67 1.0 2500.0 0.006
Layer Information Table
Layers for construction_001
Name c epsLw epsSw k rho Thickness
material_001 1000.0 0.85 0.85 0.035 2000.0 0.1
material_002 1000.0 0.85 0.85 0.035 2000.0 0.1
material_003 1000.0 0.85 0.85 0.035 2000.0 0.1